package com.example.dto.standard;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
@ApiModel(value = "新增或修改数据标准目录参数")
public class CreateOrUpdateStandardDto {

    @ApiModelProperty(value = "主键id")
    private Integer id;

    @NotBlank
    @ApiModelProperty(value = "中文名称")
    @Pattern(regexp = "^[\\u4e00-\\u9fa5a-zA-Z]+$",message = "该字段仅使用中文及大小写英文")
    private String stdChinese;

    @NotBlank
    @ApiModelProperty(value = "英文名称")
    @Pattern(regexp = "^[a-zA-Z][a-zA-Z0-9_]{4,15}$",message = "该字段仅使用大小写英文、数字及_，且仅支持字母开头")
    private String stdEnglish;

    @ApiModelProperty(value = "标准说明")
    private String stdDesc;

    @NotBlank
    @ApiModelProperty(value = "来源机构")
    private String stdSource;

    @NotBlank
    @ApiModelProperty(value = "数据类型 枚举类stdType")
    private String stdType;

    @ApiModelProperty(value = "数据长度")
    private Integer stdLength;

    @ApiModelProperty(value = "数据精度保留小数点后一位为1   保留后两位为2  以此类推")
    private Integer stdPrecision;

    @ApiModelProperty(value = "默认值")
    private String stdDefault;

    @ApiModelProperty(value = "最小值")
    private String stdMin;

    @ApiModelProperty(value = "标准最大值")
    private String stdMax;

    @ApiModelProperty(value = "码表编号")
    private String tbId;

    @ApiModelProperty(value = "是否为空 0:可为空 1：不可为空")
    private Boolean stdEmpty;


}
